package com.zzyl.nursing.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.zzyl.nursing.domain.FamilyMemberElder;
import com.zzyl.nursing.vo.FamilyListVo;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;

@Mapper
public interface FamilyMemberElderMapper extends BaseMapper<FamilyMemberElder> {


@Select("select f.id,f.family_member_id,f.elder_id,e.name elderName from family_member_elder f left join  elder e on f.elder_id = e.id where f.family_member_id=#{userId}")
    List<FamilyListVo> queryFamilyMemberList(Long userId);



}
